<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="org.lsms.dao.impl.*" %>
<% 
	DaoImpl impl_update = new DaoImpl();
	String loginname = session.getAttribute("username").toString();
	impl_update.update_login_times(loginname);
	session.setAttribute("logintimes",impl_update.get_user_login_times(loginname));
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>Administrator Starting Page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="LSMS,ICSEE,MEMBER">
	
	<link rel="stylesheet" type="text/css" href="../css/author_layout.css">
	<link rel="stylesheet" type="text/css" href="../css/hyper_link_style.css">

	<script type="text/javascript">
	
	function send_to_pass(){
		var start_id = document.send_notify_mail.start_id;
		if(start_id.value==""){
			alert("Paper start id can not be null!");
			start_id.focus();
			return false;
		}
		
		var a = confirm("Are you sure you want to send notify mail to passed papers author?");
		if(a){
			window.location = "../send_notify_mail?type=1&start_id="+start_id.value;
		}else{
			return false;
		}
	}
	
	function send_to_unpass(){
		var start_id = document.send_notify_mail.start_id;
		if(start_id.value==""){
			alert("Paper start id can not be null!");
			start_id.focus();
			return false;
		}
	
		var a = confirm("Are you sure you want to send notify mail to unpassed papers author?");
		if(a){
			window.location = "../send_notify_mail?type=2&start_id="+start_id.value;
		}else{
			return false;
		}
	}
	
	function send_to_all(){
		var start_id = document.send_notify_mail.start_id;
		if(start_id.value==""){
			alert("Paper start id can not be null!");
			start_id.focus();
			return false;
		}
	
		var a = confirm("Are you sure you want to send notify mail to all papers author?");
		if(a){
			window.location = "../send_notify_mail?type=0&start_id="+start_id.value;
		}else{
			return false;
		}
	}
	</script>

  </head>
  
  <body>
	<div id="container">
		<div id="header" class="logo_image"></div>
		<div class="nav"></div>
		<div id="author_menu" class="border">
			<table border="0" width="100%"  >
				<tr>
					<td  bgcolor="#CCCCCC"><a href="../index.jsp">Home</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="site_setting.jsp">Site Setting</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="release_new_note.jsp">Release new note</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="mail_notify.jsp">Mail Notify</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="modify_mail_content.jsp">Modify Mail Content</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="modify_info.jsp">Modify Information</a></td>
				</tr>
				<tr>
					<td  bgcolor="#CCCCCC"><a href="../logout">Log Out</a></td>
				</tr>
			</table>
		</div>
		
		<div id="content" class="bg_color border" style="height:265px">
			<div style="margin:15px">
			<p>Send Notify Mail to Paper Authors</p>
			<form action="../send_notify_mail" name="send_notify_mail" method="post">
			<table align="center" border="0" style="width:380px">
			<tr>
				<td>
				<p><b>Setting</b></p>
				</td>
			</tr>
			<tr>
				<td>
				Set the start paper ID
				</td>
				<td>
				<input type="text" name="start_id" value="0">
				</td>
			</tr>
			<tr>
				<td colspan="2">
				<hr>
				</td>
			</tr>
			<tr>
				<td>
				<p><b>Sending</b></p>
				</td>
			</tr>
			<tr>
				<td>
				Passed paper only
				</td>
				<td>
				<input type="button" value="Send" onClick="return send_to_pass()">
				</td>
			</tr>
			<tr>
				<td>
				Unpassed paper only
				</td>
				<td>
				<input type="button" value="Send" onClick="return send_to_unpass()">
				</td>
			</tr><tr>
				<td>
				All
				</td>
				<td>
				<input type="button" value="Send" onClick="return send_to_all()">
				</td>
			</tr>
			</table>
				
			
			</form>
			</div>
		</div>
		
		<div class="nav"></div>
			
		<div id="footer" class="footer_color border">
			<p align="center"><b>&copy;2010 LSMS-All Rights Reserved.</b></p>
			<p align="center"> <b>Powered by Shu.</b></p>
		</div>
	</div>
  </body>
</html>
